home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / Graphics / Pyramid / Source / ModelController.m < prev    next >
Text File  |  1993-09-15  |  1KB  |  53 lines

  1. /*    ModelController.m - Interface to selecting model
  2.  *    Copyright (C) 1993 Corona Design, Inc. All rights reserved.
  3.  *
  4.  *    Abstract
  5.  *        Encapsulates the user interface for selecting a scene model.
  6.  *
  7.  *    RCS path: 
  8.  *        $Source: /Users/pkron/Projects/voxel/Pyramid/RCS/ModelController.m,v $
  9.  *    Modified: $Date: 93/09/15 12:35:08 $ by $Author: pkron $
  10.  *    Current State: $State: Exp $ locked by $Locker:  $
  11.  */
  12.  
  13. #import        "ModelController.h"
  14. #import        "standard.h"
  15.  
  16. #import        "Kitchen.h"
  17. #import        "Pyramid.h"
  18. #import        "Tesselmeer.h"
  19. #import        "SpatialView.h"
  20.  
  21.  
  22. @implementation    ModelController
  23.  
  24.                                 // determine model from radio button
  25. - selectModel: sender;
  26.     {
  27.     id        model;
  28.     const char    *modelClassName;
  29.     
  30.     modelClassName = [[sender selectedCell] title];
  31.     if ( strcmp( modelClassName, "Tesselmeer") EQ 0 )
  32.         model = [[Tesselmeer alloc] init];
  33.     else if ( strcmp( modelClassName, "Kitchen") EQ 0 )
  34.         model = [[Kitchen alloc] init];
  35.     else
  36.         model = [[Pyramid alloc] init];
  37.     
  38.     [view useModel: model];
  39.     return( self);
  40.     }
  41.     
  42.  
  43. @end
  44.  
  45. #ifdef    _LOG
  46. /*
  47.  *    $Log:    ModelController.m,v $
  48. Revision 1.1  93/09/15  12:35:08  pkron
  49. Created.
  50.  
  51.  */
  52. #endif        
  53.